import request from '@/utils/request'

// 获取专题树
export function getTree(data) {
  return request({
    url: 'archive/special/subject/tree',
    method: 'post',
    data: data
  })
}

// 新增专题
export function addCode(data) {
  return request({
    url: 'archive/special/subject',
    method: 'post',
    data: data
  })
}

// 获取专题信息
export function getCodeDetail(id) {
  return request({
    url: 'archive/special/subject/'+ id,
    method: 'get'
  })
}

// 修改专题/授权
export function updateCode(data) {
  return request({
    url: 'archive/special/subject',
    method: 'put',
    data: data
  })
}

// 删除专题
export function deleteCode(id) {
  return request({
    url: 'archive/special/subject/'+ id,
    method: 'delete'
  })
}

// 删除上传文件
export function removeFile(data) {
  return request({
    url: 'archive/special/subject/file/remove?filePath='+ data.filePath,
    method: 'post',
    data: data
  })
}

//获取人员树接口
export function deptUserTree(query) {
  return request({
    url: '/system/user/deptUserTreeNoDateScope',
    method: 'GET',
    params: query
  })
}
